<?php
/**
 * @author: zhouzhongyuan <435690026@qq.com>
 */


namespace common\db;


class ActiveQuery extends \yii\db\ActiveQuery
{
    public function active($active = true)
    {
        return $active ?
            $this->andWhere(["status" => ActiveRecord::STATUS_ACTIVE]) :
            $this->andWhere(["status" => ActiveRecord::STATUS_DELETED]);
    }

}